home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7779 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: menkar.cs.utk.edu!doolin
  2. From: doolin@menkar.cs.utk.edu (David Doolin)
  3. Newsgroups: comp.lang.c
  4. Subject: dlist; *not* homework!
  5. Date: 28 Feb 1996 23:04:54 GMT
  6. Organization: Computer Science Dept, University of Tennessee, Knoxville
  7. Distribution: world
  8. Message-ID: <4h2n2mINN2sm@CS.UTK.EDU>
  9. NNTP-Posting-Host: menkar.cs.utk.edu
  10.  
  11.  
  12. Disclaimer:  The following pertains to code I am writing to
  13. investigate the validity of an analytic solution I developed
  14. for MS level work in Civil Engineering.
  15.  
  16. I need to take two sorted double linked lists, and merge 
  17. them into one sorted list.  I have at my
  18. disposal: Usenet, the Cfaq, working dlist code (part of which
  19. I wrote, part of which I have linked in).  What I don't have
  20. is an algorithm.
  21.  
  22. Here are some specifics.  The dlist consists of a head node
  23. with front and back pointers that initially point to itself.
  24. I can insert at either the front or back, or between any node.  
  25. I can also insert an entire list if necessary. The structure
  26. of the program consists of a main dlist with a sub dlist attached
  27. at each main node.  All node values are initially cast as a null pointer, 
  28. which I recast according to use: to a structure pointer for the
  29. sublist, to a dlist pointer for the main list.  I have already 
  30. written the traversal routines, which work well.  Restated,
  31. I want to sort the values of two already sorted doubly linked lists.
  32.  
  33. I would *love* to get a compilable piece of source for this,
  34. but I would settle for an algorithm, preferably in pseudo-code
  35. (LaTeX!).  Actually, even an appropriate library reference would
  36. be nice.
  37.  
  38. If this sounds too suspiciously like _homework_, I would happily
  39. spend several hours boring anyone to tears about the significance
  40. and ramifications of the analytic solutions.  I also have 
  41. some fascinating (!) papers available!
  42.  
  43. Many thanks,
  44. Dave Doolin
  45. doolin@cs.utk.edu
  46.  
  47. ps. Consider it a work of charity: increasing the use and literacy 
  48. of C in the Civil Engineering community!
  49.